identity Function

public pure function identity(n) result(rst)

Constructs an N-by-N identity matrix.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: n

The size of the matrix.

Return Value real(kind=real64), allocatable, dimension(:,:)

The resulting matrix.